﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="parameter_add.aspx.cs" Inherits="Shuba.Web.master.parameter_add"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Header1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">

    <script language=javascript>
	function Validate()
    {
        if (document.getElementById('ctl00_ContentPlaceHolder1_rbProcessDate_1').checked == false)
        {
            return confirm('Are you sure, you do not automatically Processing Date ?');
        }
    }
    
     function Check() {   
        if (document.getElementById('ctl00_ContentPlaceHolder1_rbProcessDate_0').checked == true)
        {
            res = confirm('Validation Processing Date\rClick "OK" if the processing of date retrieved from the server date\rClick "Cancel" if the date is taken from the manual date');
            document.getElementById('ctl00_ContentPlaceHolder1_hidAuto').value = res;
        }
        else
        {
            document.getElementById('ctl00_ContentPlaceHolder1_hidAuto').value = false;
        } 
    }
       
     function ConfirmDropDownValueChange(source, arguments) {
        if (document.forms[0]['ctl00_ContentPlaceHolder1_rbProcessDate_0'].value == "1")
        {
            res = confirm('Validation Processing Date\rClick "OK" if the processing of date retrieved from the server date\rClick "Cancel" if the date is taken from the manual date');
            document.forms[0]['ctl00_ContentPlaceHolder1_hidAuto'].value = res;
        }
        if (res)
        {
            document.forms[0]['ctl00_ContentPlaceHolder1_dtProcessDate_foo'].enabled = false;
        }
        arguments.IsValid = res;
     }
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
            <table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
				<tr>
					<td class="text bg_content" bgcolor="#FFFFFF" align="center"><p>&nbsp;</p>
			<table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
				<tr>
					<td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="30%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                    </td>
					<td class="title_back" align="right">
					<a class="text" href="parameter_list.aspx">Paremeter List</a>&nbsp;&nbsp;
					</td>				                            
				</tr>
				<tr>
					<td colspan="2" class="border_nobottom bg_subtitle_white">&nbsp; Update</td>
				</tr>
				<tr>
				<td class="border_nobottom" colspan="2">
				<table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
					<tr>
					<td class="bg_grid" align="right"><b>SPA Desktop Parameters</b></td>
					<td class="bg_grid" align="left">&nbsp;</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Good Until Follow-Up Lending</td>
						<td class="bg_grid2" align="left">
                            <asp:HiddenField ID="hidID" runat="server" />
                            <asp:TextBox ID="txtGuFUp" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;day(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtGuFUp" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator1" Type=Integer ControlToValidate="txtGuFUp" runat="server" ErrorMessage="Good Until Follow-Up Must be a Number (1 - 120)" MinimumValue="1" MaximumValue="120"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Good Until Close Deal Lending</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtGuCD" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;day(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtGuCD" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator2" Type=Integer ControlToValidate="txtGuCD" runat="server" ErrorMessage="Good Until Follow-Up Must be a Number (1 - 120)" MinimumValue="1" MaximumValue="120"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Good Until Follow-Up Funding</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtGuFUpFunding" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;day(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtGuFUpFunding" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator9" Type=Integer ControlToValidate="txtGuFUpFunding" runat="server" ErrorMessage="Good Until Follow-Up Funding Must be a Number (1 - 120)" MinimumValue="1" MaximumValue="120"></asp:RangeValidator>
						</td>
					</tr>
                    <tr>
						<td class="bg_grid" align="right" width="25%">Good Until Close Deal Funding</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtGuCDFunding" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;day(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtGuCDFunding" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator10" Type=Integer ControlToValidate="txtGuCDFunding" runat="server" ErrorMessage="Good Until Follow-Up Funding Must be a Number (1 - 120)" MinimumValue="1" MaximumValue="120"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">SPADA & Temp Prospect UM Purging Period</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtPurg" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;month(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtPurg" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator3" Type=Integer ControlToValidate="txtPurg" runat="server" ErrorMessage="Purging Period Must be a Number (1 - 6)" MinimumValue="1" MaximumValue="6"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Plafon Plan Parameter - NPWP</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtNPWP" runat="server" width="200px" MaxLength="12" CssClass="text"></asp:TextBox>&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtNPWP" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator6" Type="Double" ControlToValidate="txtNPWP" runat="server" ErrorMessage="NPWP Must be a Greater than '0'" MinimumValue="1" MaximumValue="999999999999"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Final Dedup Result to Close Deal</td>
						<td class="bg_grid2" align="left">
						    <asp:RadioButtonList ID="rbFinalDedup" RepeatDirection="Horizontal" runat="server" CssClass="text"
                                BorderWidth="2" AutoPostBack="true"> 
                                <asp:ListItem Value="1" Text="Yes"></asp:ListItem>
                                <asp:ListItem Value="0" Text="No"></asp:ListItem>
                            </asp:RadioButtonList>
						</td>
					</tr>
					<tr>
					<td class="bg_grid" align="right"><b>SPA Web Parameters</b></td>
					<td class="bg_grid" align="left">&nbsp;</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">SPA Web Purging Period</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtPurgWeb" runat="server" width="100px" MaxLength="3" CssClass="text"></asp:TextBox>&nbsp;month(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtPurgWeb" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator4" Type=Integer ControlToValidate="txtPurgWeb" runat="server" ErrorMessage="Purging Period Must be a Number (1 - 24)" MinimumValue="1" MaximumValue="24"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
					<td class="bg_grid" align="right"><b>Database Password</b></td>
					<td class="bg_grid" align="left">&nbsp;</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">SPADA DB Password</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtPass" TextMode=Password runat="server" width="250px" MaxLength="20" CssClass="text"></asp:TextBox> (Maximum 20 Characters)
                            <asp:HiddenField ID="hidOldPass" runat="server" />
						    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtPass" ErrorMessage="*"></asp:RequiredFieldValidator>
						</td>
					</tr>
					<tr>
					<td class="bg_grid" align="right"><b>General Parameters</b></td>
					<td class="bg_grid" align="left">&nbsp;</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Is Auto / Manual Processing Date</td>
						<td class="bg_grid2" align="left">
						    <asp:RadioButtonList ID="rbProcessDate" RepeatDirection="Horizontal" runat="server" CssClass="text"
                                BorderWidth="2" AutoPostBack="true" onselectedindexchanged="rbProcessDate_SelectedIndexChanged" > 
                                <asp:ListItem Value="1" onclick="Check(this)" Text="Auto"></asp:ListItem>
                                <asp:ListItem Value="0" onclick="Check(this)" Text="Manual"></asp:ListItem>
                            </asp:RadioButtonList>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Processing Date</td>
						<td class="bg_grid2" align="left">
						 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
						  <ContentTemplate>
						        <cc:DatePicker ID="dtProcessDate" imgDirectory="../images/" ControlCssClass="text" CssClass="text" runat="server"></cc:DatePicker>
						        <asp:HiddenField ID="hidAuto" runat="server" />
						 </ContentTemplate>
						 <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="rbProcessDate" EventName="SelectedIndexChanged" />                            
                         </Triggers>
						 </asp:UpdatePanel>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Time Out</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtTimeOut" runat="server" width="50px" MaxLength="2" CssClass="text"></asp:TextBox>&nbsp;minute(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtTimeOut" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator5" Type=Integer ControlToValidate="txtTimeOut" runat="server" ErrorMessage="Time Out Must be a Number (1 - 60)" MinimumValue="1" MaximumValue="60"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Refresh Time Login</td>
						<td class="bg_grid2" align="left">
                            <asp:TextBox ID="txtRefresh" runat="server" width="50px" MaxLength="2" CssClass="text"></asp:TextBox>&nbsp;minute(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtRefresh" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator7" Type=Integer ControlToValidate="txtRefresh" runat="server" ErrorMessage="Refresh Time Must be a Number (1 - 10)" MinimumValue="1" MaximumValue="10"></asp:RangeValidator>
						</td>
					</tr>
					<tr>
						<td class="bg_grid" align="right" width="25%">Job Batch Scheduler Time Final Dedup</td>
						<td class="bg_grid2" align="left">
						    <asp:TextBox ID="txtFinalDedup" runat="server" width="50px" MaxLength="2" CssClass="text"></asp:TextBox>&nbsp;minute(s)&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtFinalDedup" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator8" Type=Integer ControlToValidate="txtFinalDedup" runat="server" ErrorMessage="Job Final Dedup Must be a Number (1 - 60)" MinimumValue="1" MaximumValue="60"></asp:RangeValidator>
						</td>
					</tr>
					</table>
				    <!-- Error Message -->
				    <table runat=server visible=false id="ErrBox" class="border" border="0" width="100%" cellspacing="0" cellpadding="2">
				    <tr>
				    <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
				    </tr>
				    </table>
				    <!-- End Of Error Message -->
					
				</td></tr>
				<tr>
				<td class="border bg_footer" colspan="2" align=right>
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="buttonsmall" onclick="btnSubmit_Click" /> <%--OnClientClick="return Validate();"--%>
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="buttonsmall" CausesValidation="False" onclick="btnCancel_Click" />
						&nbsp; &nbsp; </td></tr>
			    </table>
					<p></td>
		</tr>
</table>
</asp:Content>
